<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
	<title>参与拍卖</title>
	<link rel="stylesheet" type="text/css" href="__DISPORT__/css/bootstrap.css">
	<link rel="stylesheet" type="text/css" href="__DISPORT__/css/weui.min.css">
	<link rel="stylesheet" href="__DISPORT__/css/jquery-weui.min.css">
	<link rel="stylesheet" type="text/css" href="__DISPORT__/css/style.css">
	<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
	<script>
        wx.config({
            debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来，若要查看传入的参数，可以在pc端打开，参数信息会通过log打出，仅在pc端时才会打印。
            appId: '{$wxdata['appid']}', // 必填，公众号的唯一标识
            timestamp:{$wxdata['time']} , // 必填，生成签名的时间戳
            nonceStr: '{$wxdata['noncestr']}', // 必填，生成签名的随机串
            signature: '{$wxdata['signature']}',// 必填，签名，见附录1
            jsApiList: [
                'onMenuShareAppMessage',
                'onMenuShareTimeline',
            ]
        });
        wx.ready(function(){
            wx.onMenuShareTimeline({
                title: '{$goods_info['title']}', // 分享标题
                link: "{$goods_info['headurl']}{:url('Jpai/index')}?id={$goods_info['id']}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                imgUrl: '{$goods_info['headurl']}__PUBLIC__{$goods_info['thumb']}', // 分享图标
                success: function () {
                    // 用户确认分享后执行的回调函数
                    alert('分享成功');
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                    alert('分享已取消');
                }
            });

            wx.onMenuShareAppMessage({
                title: '{$goods_info['title']}', // 分享标题
                imgUrl: '{$goods_info['headurl']}__PUBLIC__{$goods_info['thumb']}', // 分享图标
                desc: '拍卖时间:{$goods_info['starttime']|date="m月d日H:i时",###}                             起拍价:{$goods_info['startprice']}元  价高得   最专业的互联网拍卖', // 分享描述
                link: "{$goods_info['headurl']}{:url('Jpai/index')}?id={$goods_info['id']}", // 分享链接，该链接域名或路径必须与当前页面对应的公众号JS安全域名一致
                type: '', // 分享类型,music、video或link，不填默认为link
                dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
                success: function () {
                    // 用户确认分享后执行的回调函数
                    alert('分享成功');
                },
                cancel: function () {
                    // 用户取消分享后执行的回调函数
                }
            });
        });
        wx.error(function(res){

        });

	</script>
	<link rel="stylesheet" href="__DISPORT__/photo/dist/photoswipe.css">
	<link rel="stylesheet" href="__DISPORT__/photo/dist/default-skin/default-skin.css">
	<!-- Core JS file -->
	<script src="__DISPORT__/photo/dist/photoswipe.min.js"></script>
	<!-- UI JS file -->
	<script src="__DISPORT__/photo/dist/photoswipe-ui-default.min.js"></script>
	<style type="text/css">
		#demo-test-gallery a {width:100%; height:230px;}
		#demo-test-gallery a img{width:100%; height:230px;}
		.demo-gallery{width:100%;}
		.pswp__img{width:375px; height:250px;}
		/*拍卖师发言*/
		#pai-main-paims{ font-size: 12px;}
		#pai-main-paims ul{list-style: none; margin: 0;padding: 0;}
		#pai-main-paims .paims-time{float: right;}
		#pai-main-paims .fayannow{color:#000000;}
		#pai-main-paims .fayanlast{color:#D9D9D9;}
		.pai-main-head{width: 100%; margin: 0;padding: 0;}
		.pai-main-head a{ float:left;background-color:gray;display: inline-block;  mso-row-margin-right: 0; width: 25%; text-align: center;font-size: 12px; line-height: 30px; color: #FFFFFF; text-decoration: none;}
		.pai-main-head .headnow{background-color: red;}
		.pai-main-head .headother{background-color: gray;}
	</style>
</head>
<body>
<!--针对出价按钮在mypaimai.js中出价的时候判断一下是否资格通过-->
	<div class="container-fluid">
		<div class="pai-main-head">
			{volist name="goodslist" id="vo"}
			<a href="{:url('Jinpai/index')}?id={$vo.id}&is_auct=1"  class="<?php if($vo['id']==$current_good['id']) echo 'headnow'; else echo 'headother'; ?>">
				{$vo.sort}号商品<?php
                        if($vo['is_end'] ==0 ){
                        if($vo['is_giveup']==1){
                        echo '被放弃';
                        }else{
                            if($vo['is_pause']==1){
                                echo '进行中';
                            }else{
                                //未开始或被暂停（这块儿不好区分）
                                if($vo['starttime'])//如果存在开始时间肯定是开始了的被暂停了
                                    echo '被暂停';
                                else
                                    echo '未开始';
                            }
                        }
                        }else{
                            if($vo['is_sure']==1){
                                echo '已流拍';
                            }else{
                                echo '已成交';
                            }
                        }
                    ?></a>
			{/volist}
		</div>
		<article class="htmleaf-container">
			<div class="row" style="margin:0;padding:0; width: 100%;">
				<div id="demo-test-gallery" class="demo-gallery">
					<a href="__PUBLIC__<?php if($current_good['thumb1']) echo $current_good['thumb1']; else echo '/static/home/images/myjpai.jpg'; ?>" data-size="1600x1067" data-med="__PUBLIC__<?php if($current_good['thumb']) echo $current_good['thumb']; else echo '/static/home/images/myjpai.jpg'; ?>" data-med-size="1024x683" data-author="Folkert Gorter" class="demo-gallery__img--main">
						<img src="__PUBLIC__<?php if($current_good['thumb1']) echo $current_good['thumb1']; else echo '/static/home/images/myjpai.jpg'; ?>" alt=""  />
					</a>
					<a href="__PUBLIC__<?php if($current_good['thumb2']) echo $current_good['thumb2']; else echo '/static/home/images/myjpai.jpg'; ?>" data-size="1600x1067" data-med="__PUBLIC__<?php if($current_good['thumb1']) echo $current_good['thumb1']; else echo '/static/home/images/myjpai.jpg'; ?>" data-med-size="1024x683" data-author="Thomas Lefebvre" style="display:none;">
						<img src="__PUBLIC__<?php if($current_good['thumb2']) echo $current_good['thumb2']; else echo '/static/home/images/myjpai.jpg'; ?>" alt="" />

					</a>

					<a href="__PUBLIC__<?php if($current_good['thumb3']) echo $current_good['thumb3']; else echo '/static/home/images/myjpai.jpg'; ?>" data-size="1600x1068" data-med="__PUBLIC__<?php if($current_good['thumb2']) echo $current_good['thumb2']; else echo '/static/home/images/myjpai.jpg'; ?>" data-med-size="1024x683" data-author="Samuel Rohl" style="display:none;">
						<img src="__PUBLIC__<?php if($current_good['thumb3']) echo $current_good['thumb3']; else echo '/static/home/images/myjpai.jpg'; ?>" alt="" />
					</a>
					<a href="__PUBLIC__<?php if($current_good['thumb4']) echo $current_good['thumb4']; else echo '/static/home/images/myjpai.jpg'; ?>" data-size="1600x1068" data-med="__PUBLIC__<?php if($current_good['thumb2']) echo $current_good['thumb2']; else echo '/static/home/images/myjpai.jpg'; ?>" data-med-size="1024x683" data-author="Samuel Rohl" style="display:none;">
						<img src="__PUBLIC__<?php if($current_good['thumb4']) echo $current_good['thumb4']; else echo '/static/home/images/myjpai.jpg'; ?>" alt="" />
					</a>
				</div>
			</div>

			<div class="pswp" tabindex="-1" role="dialog" aria-hidden="true">
				<div class="pswp__bg"></div>
				<div class="pswp__scroll-wrap">

					<div class="pswp__container">
						<div class="pswp__item"></div>
						<div class="pswp__item"></div>
						<div class="pswp__item"></div>
						<div class="pswp__item"></div>
					</div>
					<div class="pswp__ui pswp__ui--hidden">
						<div class="pswp__top-bar">
							<div class="pswp__counter"></div>
							<button class="pswp__button pswp__button--close" title="Close (Esc)"></button>
							<!--<button class="pswp__button pswp__button&#45;&#45;share" title="Share"></button>-->
							<button class="pswp__button pswp__button--fs" title="Toggle fullscreen"></button>
							<button class="pswp__button pswp__button--zoom" title="Zoom in/out"></button>
							<div class="pswp__preloader">
								<div class="pswp__preloader__icn">
									<div class="pswp__preloader__cut">
										<div class="pswp__preloader__donut"></div>
									</div>
								</div>
							</div>
						</div>
						<div class="pswp__share-modal pswp__share-modal--hidden pswp__single-tap">
							<div class="pswp__share-tooltip"></div>
						</div>
						<button class="pswp__button pswp__button--arrow--left" title="Previous (arrow left)">
						</button>
						<button class="pswp__button pswp__button--arrow--right" title="Next (arrow right)">
						</button>
						<div class="pswp__caption">
							<div class="pswp__caption__center"></div>
						</div>
					</div>
				</div>
			</div>
		</article>
		<div class="container-my">
			<div class="row" style=" margin-top:5px;">
				<p style="letter-spacing:2px; margin:0;font-weight:bold;">{$current_good['title']}</p>
			</div>

			<div class="row" >
				<div class="col-xs-7" style="padding-left:0;padding-right:0;">
					<p style="font-size:12px;color:red;">目前最高价 <span style="font-size:18px;" id="now_max_price">￥{$biddenlist['0']['price']}元</span></p>
				</div>
				<div class="col-xs-5" style="margin-top:-5px;">
					<p style="font-size:12px; color:blue; margin:0;" id="my_start_price">起拍价 ￥{$current_good['start_price']}元</p>
					<p style="font-size:12px; color:red; margin:0;"><span id="time_type">倒计时：</span> <span id="time_str">00:59:59</span></p>
				</div>
			</div>
			<div>
				<p id="myp3" style="width:auto;overflow : hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-line-clamp:3;-webkit-box-orient: vertical;">{$current_good['good_des']}</p>
				<p style="font-size:12px;">拍卖企业：{$current_good['acut_company']}</p>
				<p style="font-size:12px; margin-top:-10px;">拍卖师：{$current_good['auctineer']} <span
						style="margin-left: 27%;">执业证书号：{$current_good['code_num']}</span></p>
				<p style="font-size:12px; margin-top:-10px;">咨询电话：{$current_good['phone']}</p>
			</div>
		</div>
		<hr style="border-top: 1px solid gray; margin:10px -15px;"/>
		<!--拍卖师发言-->
		<div id="pai-main-paims">
			<ul id="pms-words">
				{volist name="wordslist" id="vo"  offset="0" length='3'}
				<li class="<?php if($i==1) echo 'fayannow'; else echo 'fayanlast';?>">拍卖师：{$vo.text} <span class="paims-time">{$vo.cretime |date="Y-m-d H:i:s",###}</span></li>
				{/volist}
			</ul>
			<p class="text-center" style="display: <?php if(!$wordslist) echo 'none'; ?>">
				<button type="button" class="btn btn-danger btn-sm text-center" data-toggle="modal" data-target="#myModalpmswords">
					更多发言
				</button>
			</p>
		</div>
		<hr style="border-top: 1px solid gray; margin:10px -15px;"/>
		<div class="container-chujia">
		       <p style="color: #27A4DF; font-size:16px; text-align:center;" id="cutpaimai"></p>
                     	<div class="row">
				<div class="col-xs-8" style="border-right:1px solid gray; margin-top:7px;">
                    <div class="row" style="color:red">
						<span class=" glyphicon glyphicon-minus" style="padding:3px; border:1px solid red; border-radius:1px;" onclick="biddenPrice.cutPrice()"></span>
						<input type="number" value="<?php if($biddenlist[0]['price']) echo $biddenlist[0]['price']+$current_good['marup_price']; else echo $current_good['start_price']; ?>" id="pai-price" style="background-color:#fff;text-align:center;display: inline-block; width:135px; padding:3px 0;color:#000; border-radius:2px;">
						<span class="glyphicon glyphicon-plus" style="padding:3px; border:1px solid red; border-radius:1px;" onclick="biddenPrice.addPrice()"></span>
				
                     </div>
				</div>
				<div class="col-xs-4" style="font-size:11px;">
					<span style="display:block; width:64px; text-align:center; font-weight:bold;">加价幅度</span>
					<span style="display:block; width:62px;border:1px solid red; color:red; padding:0 4px; border-radius:3px; text-align:center; font-size:13px;" id="my_marup_price">￥{$current_good['marup_price']}元</span>
				</div>
			</div>
			<div class="row" style="margin-top:15px;">
				<div class="col-xs-8">
					<div class="row">
					<a href="javascript:void (0);" class="btn btn-primary btn-lg active" disabled="true" id="sendPrice" role="button" style="background-color: #E70012;border-color:#E70012; width:92%;" onclick="biddenPrice.chuJia()">出价</a>
					<a href="javascript:;void (0);" class="btn btn-primary btn-lg active" id="applybtn" role="button" style="display:none;background-color: #E70012; border-color:#E70012; width:92%;"data-toggle="modal" data-target="#myModal">申请拍卖资格</a>
					</div>
				</div>
				<div class="col-xs-4">
					<span style="text-align: center;background-color:lightpink; color:gray;display:block;width:62px; font-size:15px; border-radius:3px;">您的编号<?php if($qualify_info['status']==1) echo $qualify_info['usernumber'];?></span>
				</div>
			</div>
		</div>

		<div class="container" style="margin-top:15px;">
			<div class="row">
				<table class="table text-center" style="font-size:11px;">
					<tr>
						<td>编号</td>
						<td>状态</td>
						<td>时间</td>
						<td>出价</td>
					</tr>
					<tbody id="bidden-con">
					{volist name="biddenlist" id="vo" offset="0" length='10'}
					<tr style="color:<?php if($i==1)echo 'red'; else echo 'gray'; ?>;">
						<td>{$vo.usernumber}</td>
						<td><?php if($i==1) echo '目前最高价'; else echo '已出局';?></td>
						<td>{$vo.cretime |date="m-d H:i:s",###}</td>
						<td>￥{$vo.price}元</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
		</div>
	</div>
<p class="text-center">
	<button type="button" class="btn btn-danger btn-sm text-center" data-toggle="modal" data-target="#myModaljiajia">
		查看全部加价记录
	</button>
</p>
	<!-- Modal -->
	<div class="modal fade" id="myModaljiajia" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
		<div class="modal-dialog" role="document">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title" id="myModalLabel">出价列表</h4>
				</div>
				<div class="modal-body">
					<table class="table text-center" style="font-size:11px;">
						<tr>
							<td>编号</td>
							<td>状态</td>
							<td>时间</td>
							<td>出价</td>
						</tr>
						<tbody id="all-bidden-con">
						{volist name="biddenlist" id="vo"}
						<tr style="color:<?php if($i==1)echo 'red'; else echo 'gray'; ?>;">
							<td>{$vo.usernumber}</td>
							<td><?php if($i==1) echo '目前最高价'; else echo '已出局';?></td>
							<td>{$vo.cretime |date="m-d H:i:s",###}</td>
							<td>￥{$vo.price}元</td>
						</tr>
						{/volist}
						</tbody>
					</table>
				</div>
				<div class="modal-footer">
					<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
				</div>
			</div>
		</div>
	</div>
<!-- 拍卖师发言 -->
<div class="modal fade" id="myModalpmswords" tabindex="-1" role="dialog" aria-labelledby="myModalLabelpms">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabelpms">拍卖师发言</h4>
			</div>
			<div class="modal-body">
				<table class="table text-center" style="font-size:11px;">
					<tbody id="all-pms-con">
					{volist name="wordslist" id="vo"}
					<tr class="<?php if($i==1)echo 'fayannow'; else echo 'fayanlast'; ?>;">
						<td class="text-left">拍卖师：{$vo.text}</td>
						<td>{$vo.cretime |date="Y-m-d H:i:s",###}</td>
					</tr>
					{/volist}
					</tbody>
				</table>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
			</div>
		</div>
	</div>
</div>

	<!-- 弹幕 -->

		<!-- Button trigger modal -->
	<!--<a href="#" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">gfjhgfj</a>-->
	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" >
	  <div class="modal-dialog text-center" role="document">
	    <div class="modal-content " style=" margin:50% auto 0 auto; padding:12px; width:80%;">
	      <div class="modal-body" style="border:1px solid red;">
	      <form >
	        <div class="input-group" style="border:1px solid red; margin-bottom:15px;">
		    <span class="input-group-addon" style="border-right:0;background-color:#fff;"><img src="__HOME__/images/icon1.jpg" style="width:20px; height:20px; "></span>
		    <input type="text" class="form-control" id="input-group-addon" name="username" placeholder="请输入您的真实姓名" style="border-left:0;">
		  </div>
		  <div class="input-group" style="border:1px solid red; margin-bottom:15px;">
		    <span class="input-group-addon" style="border-right:0;background-color:#fff;"><img src="__HOME__/images/icon2.jpg" style="width:20px; height:20px; "></span>
		    <input type="text" class="form-control" name="phone" id="inputGroupSuccess1" placeholder="请输入手机号" style="border-left:0;">
		  </div>
			  <input type="hidden" name="userid" value="{$userinfo['user_id']}">
			  <input type="hidden" name="goodsid" value="{$current_good['id']}">
			  <input class="btn btn-danger" onclick="apply.checkApply(this.form)" style="background-color: #B70005; padding: 6px 25px;" type="button"  value="点击申请拍卖资格">
			  <span id="applyclose" data-dismiss="modal" style="display: none;">用于关闭模态框</span>
		  </form>
	    </div>
	  </div>
	</div>
	</div>
	<script src="__DISPORT__/js/jquery.min.js"></script>
	<script src="__DISPORT__/js/bootstrap.min.js"></script>
	<script src="__DISPORT__/js/jquery-weui.min.js"></script>
	<script src="__DISPORT__/js/swiper.min.js"></script>
	<script src="__DISPORT__/js/city-picker.min.js"></script>
	<script type="text/javascript" src="__DISPORT__/photo/dist/myjpaipho.js"></script>
	<script src="__DISPORT__/js/mypaimai.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
                 $('#myp3').click(function () {
				var con=$(this).text();
				alert(con);
            }); 
            $('.pswp__img').css("height", '250px');
            $(function () {
                startInit.initInfo({$initInfo['good_info']},{$initInfo['auct_info']},{$initInfo['user_info']},{$initInfo['good_status_info']},{$initInfo['newest_bidden_info']},{$initInfo['other_info']});
                startInit.init();
            })
});
	</script>
</body>
</html>
